<include file="Public:head" title="用户列表"/>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('User/lists')}">用户管理</a></li>
                    <li class="active">用户列表</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="header smaller lighter blue">
                                    <div class="nav-search col-xs-10" id="nav-search">
                                        <form class="form-search" method="get">
                                            <div class="search_area">
                                                <input class="form-control search-query" type="text" name="keyword" autocomplete="off"  placeholder="请输入关键字" value="{$Think.get.keyword}">
                                                <button class="btn btn-purple btn-sm" type="submit">搜 索 <i class="icon_search icon-on-right bigger-110"></i></button>
                                            </div>
                                        </form>
                                    </div>
                                    <div class='cl'></div>
                                </div>
                                <notempty name='lists'>
                                    <div class="table-responsive">
                                        <table id="sample-table-1" class="table table-striped table-bordered table-hover">
                                            <thead>
                                                <tr>
<!--                                                    <th class="center" width='45px'>
                                                        <label>
                                                            <input type="checkbox" class="ace"  autocomplete="off"/>
                                                            <span class="lbl"></span>
                                                        </label>
                                                    </th>-->
                                                    <th width='90px' class="center">序号</th>
                                                    <th style="width:120px;">用户名称</th>
                                                      <th style="width:120px;">昵称</th>
                                                            <th style="width:70px;">下载次数</th>
                                                    <th style="width:120px;">邀请码</th>
                                                    <th style="width:80px;">email</th>
                                                    <th style="width:70px;">积分</th>
                                                    <th>已绑定</th>
                                                      <th style="width:110px;">上月签到</th>
                                                         <th style="width:110px;">本月签到</th>
                                                                  <th style="width:80px;">签到日期</th>
                                                    <th style="width:120px;">最后登录IP</th>
                                                    <th style="width:130px;">最后登录时间</th>
                                                        <th style="width:130px;">注册时间</th>
                                                                 <th style="width:130px;">用户状态</th>
                                                    <th width="65px">操作</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            <foreach name="lists" item="row">
                                                <tr>
<!--                                                    <td class="center">
                                                        <label><input type="checkbox" class="ace" name="ids" value="{$row.id}" autocomplete="off" /><span class="lbl"></span></label>
                                                    </td>-->
                                                    <td class="center">{$key+1|getPageKey} | {$row.id}</td>
                                                    <td style="text-align: left"><a href="{:U('User/detail',array('id'=>$row['id']))}">{$row.name}</a></td>
                                                     <td style="text-align: left">{$row.nickname}</td>
                                                               <td style="text-align: left">{$row.download_times}</td>
                                                     <td style="text-align: left">{$row.invite_code}</td>
                                                    <td style="text-align: left">{$row.email}</td>
                                                          <td style="text-align: left"><a href="{:U('User/points',array('keyword'=>$row['name']))}">{$row.money}</a></td>
                                                    <td><if condition="$row.qq neq ''">qq({$row.qq})</if><if condition="$row.sina neq ''"> sina</if><if condition="$row.weixin neq ''"> weixin</if></td>
                                               <td style="text-align: left">{$row.last_month_sign}</td>   
                                                          <td style="text-align: left">{$row.month_sign}</td>  
                                                                <td style="text-align: left">{$row.sign_month}</td> 
                                            <td width="160px">{$row.loginip}</td>
                                                <td>{$row.logintime|date="Y-m-d H:i:s",###}</td>
                                                       <td>{$row.addtime|date="Y-m-d H:i:s",###}</td>
                                                        <td>
                                                            <select onchange="changeUserStatus('{$row.id}', this.value)" autocomplete='off'>
                                                        <option value="0" <if condition="$row.is_check eq  0">selected</if>>待审核</option>
                                                            <option value="1" <if condition="$row.is_check eq  1">selected</if>>审核通过</option>
                                                                 <option value="-2" <if condition="$row.is_check eq  -2">selected</if>>刷积分</option>
                                                            <option value="-1" <if condition="$row.is_check eq  -1">selected</if>>积分异常</option>
                                                              <option value="-3" <if condition="$row.is_check eq  -3">selected</if>>禁止评论</option>
                                                                 <option value="-99" <if condition="$row.is_check eq  -99">selected</if>>固定证据</option>
                                                            
                                                    </select>
                                                        </td>
                                                <td class="action-buttons">
                                                    <a class="green" href="{:U('User/detail',array('id'=>$row['id']))}" data-rel="tooltip" data-original-title="编辑"><i class="icon-pencil bigger-130"></i></a>
                                                   <!-- <a class="red" data-toggle="modal"  onclick="targetDelTable('{$row.id}')" data-rel="tooltip" data-original-title="删除"><i class="icon-trash bigger-130"></i></a>-->
                                                </td>
                                                </tr>
                                            </foreach>
                                            </tbody>
                                        </table>

                                    </div>
                                    <div id="grid-pager" class="ui-state-default  ui-corner-bottom" dir="ltr">
                                        <table width='100%' data-table='user'  id='modal_del_table'>
                                            <tr>
                                                <td>
<!--                                                    <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
                                                        <a class="purple" href="{:U('User/detail')}" data-rel="tooltip" data-original-title="用户添加">
                                                            <i class="icon-plus-sign bigger-130"></i>
                                                        </a>
                                                        <a class="red" data-toggle="modal" onclick="targetDelTable(0)"  data-rel="tooltip" data-original-title="批量删除">
                                                            <i class="icon-trash bigger-130"></i>
                                                        </a>
                                                    </div>-->
                                                </td>
                                                <td class='td_pager'><div class='pager'>{$page}</div></td>
                                            </tr>
                                        </table>
                                    </div>
                                    <else/>
                                    <p class='noempty'>没有符合条件的记录,立即<a href="{:U('User/detail')}">添加</a></p>
                                </notempty>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>

<include file="Public:foot" />
<script type="text/javascript">
    function changeUserStatus(uid,status) {
      


        $.post(getUrl('Ajax/changeUserStatus'), {uid:uid, status:status}, function(data) {
           
        }, "json")

    }
    function showLoginError(tip) {
        $("#notice_error").text(tip).show();
        $("#notice_error").fadeOut(2500);
    }
</script>